﻿using System;
using System.Collections.Generic;
using System.IO.Compression;

namespace SimpleFS.Services.Compression.Implementations
{
    public class GZipCompressionServiceProvider : ICompressionServiceProvider
    {
        #region ICompressionServiceProvider Members

        public System.IO.Stream Compress(System.IO.Stream source)
        {
            GZipStream stream = new GZipStream(source, CompressionMode.Compress);
            return stream;
        }

        public System.IO.Stream Decompress(System.IO.Stream source)
        {
            GZipStream stream = new GZipStream(source, CompressionMode.Decompress);
            return stream;
        }

        #endregion
    }
}
